import { useToggle } from './MyHook'

function ToggleSample() {
    const {value, toggle} = useToggle(false);

    return (
        <div>
            { value && <div>I can show this div.</div>}
            <button onClick={toggle}>{value ? "hide" : "show"}</button>
        </div>
    )
}

export default ToggleSample;